import { VueConstructor } from "vue";
import MedusaUI from "@/components/medusa-core";
import MContainer from "@/components/container/MContainer.vue";
import VueAMap from "vue-amap";
import ProgressBar from "vue-progressbar";

import "normalize.css";

// Vue插件安装
export const installPlugin = (Vue: VueConstructor) => {
  Vue.use(MedusaUI);
  Vue.component("m-container", MContainer);

  Vue.use(ProgressBar, {
    color: "#409EFF",
    failedColor: "red",
    height: "2px",
  });

  Vue.use(VueAMap);
  VueAMap.initAMapApiLoader({
    key: "5834a95f0e9d1a6794a4c21dd275f6cd",
    plugin: [
      "AMap.Autocomplete",
      "AMap.PlaceSearch",
      "AMap.Scale",
      "AMap.OverView",
      "AMap.ToolBar",
      "AMap.MapType",
      "AMap.PolyEditor",
      "AMap.CircleEditor",
    ],
    v: "1.4.11",
  });
};
